<cfif attributes.id is 'new'>
	<cfset attributes.id = application.blog.addEntry(attributes.title,attributes.body,moreText,attributes.alias,attributes.posted)>
<cfelse>
	<cfset application.blog.saveEntry(attributes.id,attributes.title,attributes.body,moreText,attributes.alias,attributes.posted)>
</cfif>
<!--- remove all old cats that arent passed in --->
<cfif attributes.id is not "new">
	<cfset application.blog.removeCategories(attributes.id)>
</cfif>
<!--- potentially add new cat --->
<cfif len(trim(attributes.newCategory))>
	<cfset attributes.categories = application.blog.addCategory(attributes.newCategory)>
</cfif>
<cfset application.blog.assignCategories(attributes.id,attributes.categories)>
